home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / simula / books / books.lha / kirkerud / isochar.sim < prev    next >
Text File  |  1993-08-16  |  809b  |  30 lines

  1. ! Example 3.6;
  2.  
  3. begin 
  4.  
  5.   integer charnumber;
  6.  
  7.   outtext("The ISO set consists of 256 characters."); 
  8.     outimage;
  9.   outtext("The ones with rank from 32 to 126 are listed below.");
  10.     outimage;
  11.   outtext("Each character is preceded by its ISO rank."); 
  12.     outimage;
  13.  
  14.   charnumber := 32;          
  15.        ! 32 is the rank of the first printable ISO character;
  16.   while charnumber le 126 do 
  17.        ! 126 is the rank of the last printable ISO character; 
  18.     begin 
  19.       if rem(charnumber, 4) = 0 then
  20.         begin outimage; outtext("        ") end;
  21.           ! This gives a new line which starts with some blanks 
  22.           ! for every fourth character;
  23.       outint(charnumber, 7); outtext(": ");
  24.       outchar(isochar(charnumber));
  25.       charnumber := charnumber + 1;
  26.     end;
  27.   outimage; outimage;
  28.  
  29. end
  30.